
//Copyright 1997-2009 Syrinx Development, Inc.
//This file is part of the Syrinx Web Application Framework (SWAF).
// == BEGIN LICENSE ==
//
// Licensed under the terms of any of the following licenses at your
// choice:
//
//  - GNU General Public License Version 3 or later (the "GPL")
//    http://www.gnu.org/licenses/gpl.html
//
//  - GNU Lesser General Public License Version 3 or later (the "LGPL")
//    http://www.gnu.org/licenses/lgpl.html
//
//  - Mozilla Public License Version 1.1 or later (the "MPL")
//    http://www.mozilla.org/MPL/MPL-1.1.html
//
// == END LICENSE ==
using System;
using System.Text;
using System.IO;
using System.Reflection;
using System.Web.UI;

using Swaf;
using Swaf.Security;

namespace Swaf.Gui.AspNet2
{
	[ParseChildren(false)]
	public class GenericBizObjDisplay : BaseBizObjDisplay
	{
		protected bool m_templateBizObjSpecfic = false;

		public GenericBizObjDisplay(): base(){}
		public GenericBizObjDisplay(ActiveWidget widget): base(widget){}

		protected override object[] getParameterForTemplateBizRuleCall()
		{
			string pageName = Page != null ? Page.GetType().Name : null;
			return new object[] { base.CurrentBizObj, m_editPriv, ParentBizProcIds, pageName };
		}

		public bool TemplateBizObjSpecific { get { return m_templateBizObjSpecfic; } set { m_templateBizObjSpecfic = value; } }

		public override BizProcWidgetType BizProcWidgetType
		{
			get
			{
				return BizProcWidgetType.disp;
			}
			set
			{
				base.BizProcWidgetType = value;
			}
		}
		protected override bool createControls()
		{
			bool c = base.createControls();
			if (LocalMacros["imageRes"] == null)
				LocalMacros["imageRes"] = "SmallMedium";
			return c;
		}
	}
}
